import { createWebHistory, createRouter } from 'vue-router'

import autoPage from './utils/auto-route.js'

const routes = [
  {
    //  path: ``, redirect: `/chat` },
    path: `/`,
    component: () => import('./views/home/index.vue'),
  },
  // {
  //   path: `/:catchAll(.*)*`,
  //   component: () => import('./views/index.vue'),
  // },
  ...autoPage(),
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
